/*  1:   */ package org.jetbrains.jps.model.fileTypes.impl;
/*  2:   */ 
/*  3:   */

import com.intellij.openapi.fileTypes.ExactFileNameMatcher;
import com.intellij.openapi.fileTypes.ExtensionFileNameMatcher;
import com.intellij.openapi.fileTypes.FileNameMatcher;
import com.intellij.openapi.fileTypes.WildcardFileNameMatcher;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jps.model.fileTypes.FileNameMatcherFactory;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */ 
/* 10:   */ public class FileNameMatcherFactoryImpl
/* 11:   */   extends FileNameMatcherFactory
/* 12:   */ {
/* 13:   */   @NotNull
/* 14:   */   public FileNameMatcher createMatcher(@NotNull String paramString)
/* 15:   */   {
/* 16:31 */     if (paramString == null) {
/* 17:31 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/jps/model/fileTypes/impl/FileNameMatcherFactoryImpl", "createMatcher" }));
/* 18:   */     }
/* 19:31 */     if ((paramString.startsWith("*.")) && (paramString.indexOf('*', 2) < 0) && (paramString.indexOf('.', 2) < 0) && (paramString.indexOf('?', 2) < 0))
/* 20:   */     {
/* 21:35 */       void tmp94_91 = new ExtensionFileNameMatcher(paramString.substring(2).toLowerCase());
/* 22:35 */       if (tmp94_91 == null) {
/* 23:35 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/jps/model/fileTypes/impl/FileNameMatcherFactoryImpl", "createMatcher" }));
/* 24:   */       }
/* 25:35 */       return tmp94_91;
/* 26:   */     }
/* 27:38 */     if ((paramString.contains("*")) || (paramString.contains("?")))
/* 28:   */     {
/* 29:39 */       void tmp155_152 = new WildcardFileNameMatcher(paramString);
/* 30:39 */       if (tmp155_152 == null) {
/* 31:39 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/jps/model/fileTypes/impl/FileNameMatcherFactoryImpl", "createMatcher" }));
/* 32:   */       }
/* 33:39 */       return tmp155_152;
/* 34:   */     }
/* 35:42 */     void tmp198_195 = new ExactFileNameMatcher(paramString);
/* 36:42 */     if (tmp198_195 == null) {
/* 37:42 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/jps/model/fileTypes/impl/FileNameMatcherFactoryImpl", "createMatcher" }));
/* 38:   */     }
/* 39:42 */     return tmp198_195;
/* 40:   */   }
/* 41:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.jps.model.fileTypes.impl.FileNameMatcherFactoryImpl

 * JD-Core Version:    0.7.0.1

 */